<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

		<title>地址管理</title>

		<link href="/Public/assets/css/admin.css" rel="stylesheet" type="text/css">
		<link href="/Public/assets/css/amazeui.css" rel="stylesheet" type="text/css">

		<link href="/Public/css/personal.css" rel="stylesheet" type="text/css">
		<link href="/Public/css/addstyle.css" rel="stylesheet" type="text/css">
		<script src="/Public/assets/js/jquery.min.js" type="text/javascript"></script>
		<script src="/Public/assets/js/amazeui.js"></script>
		<link rel="stylesheet" href="/Public/css/demo.css">
		<link rel="stylesheet" href="/Public/css/layout.css">
		<script src="/Public/home/user.js"></script>		

	</head>

	<body>
		<!--头 -->
		<header>
			<article>
				<div class="mt-logo">
					<!--顶部导航条 -->
					<include file="./Application/Home/View/Share/header.html" />
				</div>
			</article>
		</header>

		<div class="nav-table">
			<div class="long-title"><span class="all-goods">全部分类</span></div>
			<div class="nav-cont">
				<ul>
					<li class="index"><a href="#">首页</a></li>
					<li class="qc"><a href="#">闪购</a></li>
					<li class="qc"><a href="#">限时抢</a></li>
					<li class="qc"><a href="#">团购</a></li>
					<li class="qc last"><a href="#">大包装</a></li>
				</ul>
				<div class="nav-extra">
					<i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的福利
					<i class="am-icon-angle-right" style="padding-left: 10px;"></i>
				</div>
			</div>
		</div>
		<b class="line"></b>

		<div class="center">
			<div class="col-main">
				<div class="main-wrap">

					<div class="user-address">
						<!--标题 -->
						
						
						
						<!--例子-->
						<div class="am-modal am-modal-no-btn" id="doc-modal-1">

							<div class="add-dress" id="address-hide">

								<!--标题 -->
								<div class="am-cf am-padding">
									<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">编辑地址</strong> / <small>Edit&nbsp;address</small></div>
								</div>
								<hr/>

								<div class="am-u-md-12 am-u-lg-8" style="margin-top: 20px;">
									<form class="am-form am-form-horizontal" action="/Api" method="post">

										<div class="am-form-group">
											<label for="user-name" class="am-form-label">收货人</label>
											<div class="am-form-content">
												<input type="text" id="user-name" placeholder="收货人" value="{$list.name}">
											</div>
										</div>

										<div class="am-form-group">
											<label for="user-phone" class="am-form-label">手机号码</label>
											<div class="am-form-content">
												<input id="user-phone" placeholder="手机号必填" type="text" value="{$list.telephone}">
											</div>
										</div>
										<div class="am-form-group">
											<label for="user-address" class="am-form-label">所在地</label>
											<div class="am-form-content address">
												<fieldset id="city_china_val">
													<select id="user-province" class="province cxselect" data-value="{$list.province}" data-first-title="选择省" ></select>
													<select id="user-city" class="city cxselect"  data-value="{$list.city}" data-first-title="选择市" ></select>
													<select id="user-area" class="area cxselect"  data-value="{$list.area}" data-first-title="选择地区"  ></select>
												</fieldset>
											</div>
										</div>

										<div class="am-form-group">
											<label for="user-intro" class="am-form-label">详细地址</label>
											<div class="am-form-content">
												<textarea class="" rows="3" id="user-intro" placeholder="输入详细地址" >{$list.intro}</textarea>
												<small>100字以内写出你的详细地址...</small>
											</div>
										</div>

										<div class="am-form-group">
											<div class="am-u-sm-9 am-u-sm-push-3">
												<a class="am-btn am-btn-danger" onclick="USER.useredit();">保存</a>
												<a href="/home/user/address?id={$data.id}" class="am-close am-btn am-btn-danger" data-am-modal-close>取消</a>
											</div>
										</div>
									</form>
								</div>

							</div>
							<div class="add-dress" id="address-show">
								
							</div>

						</div>

					</div>
					
					<script type="text/javascript">
						//默认地址设置
						$(document).ready(function() {							
							
							
							var $ww = $(window).width();
							if($ww>640) {
								$("#doc-modal-1").removeClass("am-modal am-modal-no-btn")
							}
							
						})
					</script>

					<div class="clear"></div>

				</div>
				<!--底部-->
				<include file="./Application/Home/View/Share/footer.html" />
			</div>

			<aside class="menu">
				<include file="./Application/Home/View/Share/menu.html" />

			</aside>
		</div>

	</body>

</html>

<script src="/Public/js/jquery-1.7.2.min.js"></script>
<script src="/Public/js/jquery.cxselect.min.js"></script>

<script>
//城市js
$.cxSelect.defaults.url = '/Public/js/cityData.min.json';

$('#city_china_val').cxSelect({
	selects: ['province', 'city', 'area'],
	nodata: 'none'
});

//获取URL的id
function getprogram(name) { 
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 
	var r = window.location.search.substr(1).match(reg); 
	if (r != null) return unescape(r[2]); return null; 
} 
var id = getprogram('id');
</script>
